//
//  ZPTeacherCmmTableViewCell.m
//  ZPIOSEducation
//
//  Created by Encoder on 17/1/12.
//  Copyright © 2017年 mini1. All rights reserved.
//

#import "ZPTeacherCmmTableViewCell.h"
@interface ZPTeacherCmmTableViewCell ()
@property (weak, nonatomic) IBOutlet UIView *starBack;

@end
@implementation ZPTeacherCmmTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setTeachingLevelScore:(int)teachingLevelScore{
    _teachingLevelScore = teachingLevelScore;
    
    for (UIImageView *img in _starBack.subviews) {
        img.highlighted=NO;
    }
    if (_teachingLevelScore>_starBack.subviews.count) {
        return;
    }
    for (int i = 0; i<_teachingLevelScore; i++) {
        ((UIImageView *)_starBack.subviews[i]).highlighted=YES;
    }
    
    
}



@end
